import java.util.Scanner;

public class Algorithm {
    /*public static void main(String[] args) {
        TreeNode root = new TreeNode(3);
        TreeNode node = new TreeNode(4);
        TreeNode node1 = new TreeNode(5);
        TreeNode node2 = new TreeNode(1);
        TreeNode node3 = new TreeNode(2);
        TreeNode node4 = new TreeNode(0);
        TreeNode subRoot = new TreeNode(4);
        TreeNode node6 = new TreeNode(1);
        TreeNode node7 = new TreeNode(2);
        root.left = node;
        node.left = node2;
        node2.left = null;
        node2.right = null;
        node.right = node3;
        node3.left = node4;
        node3.right = null;
        root.right = node1;
        node1.left = null;
        node1.right = null;
        subRoot.left = node6;
        subRoot.right = node7;
        node6.left = null;
        node6.right = null;
        node7.left = null;
        node7.right = null;
        boolean res = isSubtree(root, subRoot);
    }

    public static boolean isSubtree(TreeNode root, TreeNode subRoot) {
        String str1 = process(root, "");
        String str2 = process(subRoot, "");
        char[] str = str1.toCharArray();
        char[] match = str2.toCharArray();
        if (match.length > str.length) {
            return false;
        }
        int x = 0, y = 0;
        int[] next = getNext(match);
        while (x < str.length && y < match.length) {
            if (str[x] == match[y]) {
                x++;
                y++;
            } else if (y == 0) {
                x++;
            } else {
                y = next[y];
            }
        }
        return y == match.length;
    }

    public static String process(TreeNode root, String str) {
        if (root == null) {
            str += "n";
        } else {
            str += String.valueOf(root.val);
            str = process(root.left, str);
            str = process(root.left, str);
        }
        return str;
    }

    public static int[] getNext(char[] match) {
        if (match.length == 1) {
            return new int[] {-1};
        }
        int[] next = new int[match.length];
        next[0] = -1;
        next[1] = 0;
        int cn = 0, i = 2;
        while (i < match.length) {
            if (match[cn] == match[i-1]) {
                next[i++] = ++cn;
            } else if (cn > 0) {
                cn = next[cn];
            } else {
                next[i++] = 0;
            }
        }
        return next;
    }

     */

    public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);
      long x = sc.nextLong();
      long n = x / 160;
      long star = (n / 10) * 3;
      long temp1 = 0;
      long temp2 = 0;
      while (star != 0) {
          if (star > 50) {
              temp1 += star / 50;
              star %= 50;
              star += temp1 * 3;
          } else {
              temp2 = star / 5;
              star = 0;
          }
      }
      n += temp1 * 10 + temp2;
      System.out.println(n);
    }
}




/*class TreeNode {
      int val;
      TreeNode left;
      TreeNode right;
      TreeNode() {}
      TreeNode(int val) { this.val = val; }
      TreeNode(int val, TreeNode left, TreeNode right) {
          this.val = val;
          this.left = left;
          this.right = right;
     }



}

 */
/*
 public boolean rotateString(String s, String goal) {
        if  (s.length() < goal.length() || goal.length() < s.length()) {
            return false;
        }
        StringBuffer str = new StringBuffer(goal);
        str.append(goal);
        goal = str.toString();
        char[] arr = goal.toCharArray();
        char[] match = s.toCharArray();
        int[] next = getNext(match);
        int x = 0, y = 0;
        while (x < arr.length && y < match.length) {
            if (arr[x] == match[y]) {
                x++;
                y++;
            } else if (y == 0) {
                x++;
            } else {
                y = next[y];
            }
        }
        return y == match.length ? true : false;
    }

    public int[] getNext(char[] match) {
        if (match.length == 1) {
            return new int[] {-1};
        }
        int[] next = new int[match.length];
        next[0] = -1;
        next[1] = 0;
        int cn = 0, i = 2;
        while (i < match.length) {
            if (match[i - 1] == match[cn]) {
                next[i++] = ++cn;
            } else if (cn > 0) {
                cn = next[cn];
            } else {
                next[i++] = 0;
            }
        }
        return next;
    }
 */

/*
 public boolean isSubtree(TreeNode root, TreeNode subRoot) {
        if (root.left == null && root.right == null && subRoot.right == null && subRoot.left == null && root.val != subRoot.val) {
            return false;
        }
        String str1 = process(root, "");
        String str2 = process(subRoot, "");
        char[] str = str1.toCharArray();
        char[] match = str2.toCharArray();
        if (match.length > str.length) {
            return false;
        }
        int x = 0, y = 0;
        int[] next = getNext(match);
        while (x < str.length && y < match.length) {
            if (str[x] == match[y]) {
                x++;
                y++;
            } else if (y == 0) {
                x++;
            } else {
                y = next[y];
            }
        }
        return y == match.length ? true : false;
    }

    public String process(TreeNode root, String str) {
        if (root == null) {
            str += "n";
        } else {
            str += String.valueOf(root.val);
            str = process(root.left, str);
            str = process(root.right, str);
        }
        return str;
    }

    public int[] getNext(char[] match) {
        if (match.length == 1) {
            return new int[] {-1};
        }
        int[] next = new int[match.length];
        next[0] = -1;
        next[1] = 0;
        int cn = 0, i = 2;
        while (i < match.length) {
            if (match[cn] == match[i-1]) {
                next[i++] = ++cn;
            } else if (cn > 0) {
                cn = next[cn];
            } else {
                next[i++] = 0;
            }
        }
        return next;
    }
 */



